import items as items
import requests

'''
企业门店id说明
樱桃小店：42921
2店：42959
一组：
    choa店：42989
    Liu店：42990
二组：
    Yang店：42991
    水店：42992

'''

#身份Token
token = 'A74686FE277AB8BD2397E3EFAFC864FFDAE6188360136B9619E702F53BC9'

def test_obtain_jsonData():
    url = f'https://base-service.ulucu.com/user/user_list_by_group?'
    paramas = {
        'token':token,
        'group_id':[42989,42991],
        'is_match':1,
        'normal':1
    }
    r = requests.get(url=url,params=paramas)
    # return r.json()
    assert r.status_code == 200
    assert r.json()['data'][0]['user_name'] == 'admin'
    # assert r.json()['data'][1] == 'cherry'
    # assert r.json()['data'][2] == 'cherry1'
    # assert r.json()['data'][3] == 'cherry6'

# shop_dic = test_obtain_jsonData()['data']
#
# for j in shop_dic:
#     print(f"user_name：{j['user_name']} | user_id:{j['user_id']} | real_name:{j['real_name']}")
# print(shop_dic)




